package org.yuyao.security.annotation;

import org.yuyao.security.enums.Logical;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author yuyao
 * @date 2025-03-07 21:49:44
 * @description 用于需要某些权限的方法
 */
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface RequiresPermissions {
    /**
     * 权限字符串列表
     * @return
     */
    String[] value() default {};

    /**
     * 逻辑运算默认是AND
     * @return
     */
    Logical logical() default Logical.AND;
}
